#include <iostream>
#include <typeinfo>
using namespace std;
template <class T>
class Pic  //模板类
{
public:
		void show(T n)
		{
			if((typeid(n)==typeid(int))&&n!=0){	
				for(i=0;i<n;i++)
				cout<<n;
				cout<<endl;
				show(n-1);
			}
			
			if((typeid(n)==typeid(char))&&n!=96){
				for(i=0;i<(n-96);i++)
				cout<<n;
				cout<<endl;
				show(n-1);
			}
			if((typeid(n)==typeid(float))&&(int)n!=0){
				for(i=0;i<(int)n;i++)
				cout<<n;
				cout<<endl;
				show(n-1);
			} 
		}
private:
	int i; 
	T n;
};



int main()
{
	int flag;
	int n;
	char n1;
	float n2;
	while(1)
	{
		cout<<"1、打印整数"<<endl;
		cout<<"2、打印字符"<<endl;
		cout<<"3、打印小数"<<endl;
		cout<<"4、退出"<<endl;
		cin>>flag;
		cout<<endl;
		switch(flag)
		{
			case 1:
					cout<<"请输入整数"<<endl;
					cin>>n;
					cout<<endl;
					Pic<int> pic;
					pic.show(n); 		
					break;
			case 2:
					cout<<"请输入字符"<<endl;
					cin>>n1;
					cout<<endl;
					Pic<char> pic1;
					pic1.show(n1); 
					break;
			case 3:
					cout<<"请输入小数"<<endl;
					cin>>n2;
					cout<<endl;
					Pic<float> pic2;
					pic2.show(n2); 
					break;
			case 4:
					return 0;
		}
	}	

}